]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
windowMenu: Use NONE ornament by default
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 30 Aug 2023 03:44:46 +0000 (05:44 +0200)
committerMarge Bot <marge-bot@gnome.org>
Thu, 31 Aug 2023 21:35:23 +0000 (21:35 +0000)
We now hide ornaments by default. As some of the items in the
window menu can be checked, that means that they will now shift
horizontally, and no longer align with other menu items when
checked.

That's quite bad, and as the items in question don't form a
distinctive group/section, adding back the spacing only to
those two items would still look fairly awkward.

So revert back to the previous behavior for this particular menu,
and default to the NONE ornament.

Closes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6962

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2926>

js/ui/windowMenu.js

index b003ee556aff2c6c8c2e76873e0f6192a25b32ab..14572285431423b69a50c2641e11a44dbd0a8a89 100644 (file)
@@ -211,6 +211,12 @@ export class WindowMenu extends PopupMenu.PopupMenu {
         if (!window.can_close())
             item.setSensitive(false);
     }
+
+    addAction(label, callback) {
+        const item = super.addAction(label, callback);
+        item.setOrnament(PopupMenu.Ornament.NONE);
+        return item;
+    }
 }
 
 export class WindowMenuManager {